package com.cc8w.home.controller;


import com.alibaba.dubbo.config.annotation.Reference;
import com.cc8w.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/home/index")
public class IndexController {

    //引入dubbo接口项目的接口,调用的是provider的实现类
    //@Reference(version = "1.0.0", url = "zookeeper://127.0.0.1:2181")
    @Reference(version = "1.0.0")
    private UserService userServiceImpl;


    @RequestMapping("/index")
    public Object index(){
        System.out.println(111);
        userServiceImpl.sayHi("1");

        return  userServiceImpl.getUser(1);
    }

}
